using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._CartographyTools._CartographicRefinement
{
    /// <summary>
    /// <para>Calculate Line Caps</para>
    /// <para>Modifies the cap type for stroke symbol layers in the line symbols of the input layer.</para>
    /// <para>修改输入图层的线符号中描边符号图层的大写类型。</para>
    /// </summary>    
    [DisplayName("Calculate Line Caps")]
    public class CalculateLineCaps : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CalculateLineCaps()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input feature layer containing line symbols. Stroke symbol layers must have the Cap Type property connected to a single attribute field with no expression applied. The values in this field are updated by this tool.</para>
        /// <para>包含线符号的输入要素图层。描边符号图层必须具有连接到单个属性字段的 Cap Type 属性，而不应用任何表达式。此字段中的值由此工具更新。</para>
        /// </param>
        public CalculateLineCaps(object _in_features)
        {
            this._in_features = _in_features;
        }
        public override string ToolboxName => "Cartography Tools";

        public override string ToolName => "Calculate Line Caps";

        public override string CallName => "cartography.CalculateLineCaps";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_features, _cap_type.GetGPValue(), _dangle_option.GetGPValue(), _out_representations];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input feature layer containing line symbols. Stroke symbol layers must have the Cap Type property connected to a single attribute field with no expression applied. The values in this field are updated by this tool.</para>
        /// <para>包含线符号的输入要素图层。描边符号图层必须具有连接到单个属性字段的 Cap Type 属性，而不应用任何表达式。此字段中的值由此工具更新。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Cap Type</para>
        /// <para><xdoc>
        ///   <para>Specifies how the ends of stroke symbol layers are drawn. The default cap type of strokes is round; the symbol is terminated with a semicircle of radius equal to stroke width centered at the line endpoint.</para>
        ///   <bulletList>
        ///     <bullet_item>Butt cap type—The stroke symbol ends exactly where the line geometry ends. This is the default.</bullet_item><para/>
        ///     <bullet_item>Square cap type—The stroke symbol ends with closed, square caps that extend past the endpoint of the line by half of the symbol width.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何绘制描边符号图层的末端。描边的默认大写类型为圆形;符号以半径等于笔画宽度的半圆终止，该半圆以线端点为中心。</para>
        ///   <bulletList>
        ///     <bullet_item>对接帽类型 - 描边符号的结束位置恰好在线几何的结束位置。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>方笔画类型 - 描边符号以闭合的方笔画结尾，这些笔画以线条端点延伸半数。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cap Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _cap_type_value _cap_type { get; set; } = _cap_type_value._BUTT;

        public enum _cap_type_value
        {
            /// <summary>
            /// <para>Butt  cap type</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Butt  cap type")]
            [GPEnumValue("BUTT")]
            _BUTT,

            /// <summary>
            /// <para>Square cap type</para>
            /// <para>Square cap type—The stroke symbol ends with closed, square caps that extend past the endpoint of the line by half of the symbol width.</para>
            /// <para>方笔画类型 - 描边符号以闭合的方笔画结尾，这些笔画以线条端点延伸半数。</para>
            /// </summary>
            [Description("Square cap type")]
            [GPEnumValue("SQUARE")]
            _SQUARE,

        }

        /// <summary>
        /// <para>Dangle Option</para>
        /// <para><xdoc>
        ///   <para>Specifies how line caps are calculated for adjoining line features that share an endpoint but are drawn with different symbology.</para>
        ///   <bulletList>
        ///     <bullet_item>Cased line dangle—The cap style is modified for dangling lines (those not connected at their endpoints to another line) and also for the lines where a cased-line symbol is joined at the endpoint of a single-stroke layer line symbol. This is the default.</bullet_item><para/>
        ///     <bullet_item>True dangle—The cap style is modified only for endpoints that are not connected to another feature.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何计算共享端点但使用不同符号系统绘制的相邻线要素的线帽。</para>
        ///   <bulletList>
        ///     <bullet_item>大小写线悬空 - 对于悬空线（未在其端点连接到另一条线的线）以及大写线符号在单描边图层线符号的端点处连接的线，将修改大写样式。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>True dangle—仅对未连接到其他要素的端点修改上限样式。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dangle Option")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _dangle_option_value _dangle_option { get; set; } = _dangle_option_value._CASED_LINE_DANGLE;

        public enum _dangle_option_value
        {
            /// <summary>
            /// <para>Cased line dangle</para>
            /// <para>Cased line dangle—The cap style is modified for dangling lines (those not connected at their endpoints to another line) and also for the lines where a cased-line symbol is joined at the endpoint of a single-stroke layer line symbol. This is the default.</para>
            /// <para>大小写线悬空 - 对于悬空线（未在其端点连接到另一条线的线）以及大写线符号在单描边图层线符号的端点处连接的线，将修改大写样式。这是默认设置。</para>
            /// </summary>
            [Description("Cased line dangle")]
            [GPEnumValue("CASED_LINE_DANGLE")]
            _CASED_LINE_DANGLE,

            /// <summary>
            /// <para>True dangle</para>
            /// <para>True dangle—The cap style is modified only for endpoints that are not connected to another feature.</para>
            /// <para>True dangle—仅对未连接到其他要素的端点修改上限样式。</para>
            /// </summary>
            [Description("True dangle")]
            [GPEnumValue("TRUE_DANGLE")]
            _TRUE_DANGLE,

        }

        /// <summary>
        /// <para>Updated Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_representations { get; set; }


        public CalculateLineCaps SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}